<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MSMS</title>
<link href="<?php echo base_url(); ?>public/css/reset.css" media="screen" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url(); ?>public/css/login.css" media="screen" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?=base_url()?>public/css/message.css" />
<link rel="shortcut icon" href="<?=base_url()?>public/images/favicon.ico" />
<script type="text/javascript" language="javascript" src="<?=base_url()?>public/js/jquery_corner.js"></script>
<script type="text/javascript" language="javascript" src="<?=base_url()?>public/js/corner.js"></script>
<script>
		window.onload = function(){
			document.frmLogin.username.focus();
		}
</script>
</head>
<?php
	$failed = trim($this -> session -> userdata('failed'));
?>
<?php
	$urgent = getBrowser();
	$name = $urgent['name'];
	$version = intval($urgent['version']);
	
	$border = '';
	if( $name == 'Internet Explorer' && $version <= 8 )
	{
		$border = "style='background:url(".base_url()."public/images/login_bg.png);width:550px;height:300px;background-repeat:no-repeat;'";	
	}
?>
<body style="background:#eee;">
<form method="post" action="<?=site_url('/administrator/login/')?>" name='frmLogin' >
	<?php echo ( $failed == '' ) ? '' : '<div class="failedMsg" style="width:50%"><span class="denied floatLeft" >
		<img src="'.base_url().'/public/images/denied.png"/></span><strong>Alert: </strong>'.$failed.'</div>';?>      
	<div class="divLogin" <?=$border?>>
    	
        <table align="center" class="tblLogin">
            <tr>
                    <td colspan="2" class="center" >
                        <h2>MSMS</h2>
                    </td>
            </tr>      
            <tr>
                <td>User name</td>
                <td><input type="text" name="username"  class="input required" /></td>
            </tr>
            <tr>
                <td>Password</td>
                <td><input type="password" name="password" class="input" /></td>
            </tr>
            <tr>
                <td>
                <input type="submit" value="ឡុីអ៊ីន" />
                </td>
            </tr>
        </table>
     </div>   
<?php
	clear_session(array('failed'));
?>     
</form>
</body>
</html>
